import java.time.LocalDateTime; //引入包

public class java0726 {

    public static void main(String[] args) {
        LocalDateTime dateTime = LocalDateTime.now(); //LocalDateTime创建对象的方式
    int year = dateTime.getYear();
    int month = dateTime.getMonthValue();
    int day = dateTime.getDayOfMonth();
    int hour = dateTime.getHour();
    int minute = dateTime.getMinute();
    int second = dateTime.getSecond();
    System.out.println(" 年："+year);
            System.out.println("⽉："+month);
                    System.out.println("⽇："+day);
                            System.out.println(" 时："+hour);
                                    System.out.println(" 分： "+minute);
                                            System.out.println(" 秒："+second);
                                            //打印现在的年月日时分秒
}

}